;(function(w,$){
	var loadmore = {
		get : function(callback, config){
			var config = config ? config : {};
			var counter = 0;
			var pageStart = 0;
			var pageSize = config.size ? config.size : 10;
			$(document).on('click', '.js-load-more', function(){
				counter ++;
				pageStart = counter * pageSize;
				callback && callback(config, pageStart, pageSize);
			});
			config.isEnd = false;
			config.isAjax = false;
			$(window).scroll(function(){
				if(!config.scroll){
					return;
				}
				if(config.isEnd == true || config.isAjax == true){
					return;
				}
				if ($(document).height() - $(this).scrollTop() - $(this).height()<100){
					counter ++;
					pageStart = counter * pageSize;
					callback && callback(config, pageStart, pageSize);
				}
			});
			callback && callback(config, pageStart, pageSize);
		},
	};
	$.loadmore = loadmore;
})(window, window.jQuery || window.Zepto);
